/******************************************************************************************

Made by Flashphoner. All rights reserved.
These sources can only be used for working with Flashphoner server.
If you want use this to create your own application (separate from Flashphoner server)
please contact support@flashphoner.com

******************************************************************************************/

package com.flashphoner.app;

import com.flashphoner.sdk.rtmp.IRtmpClient;

import java.util.TimerTask;

/**
 * Hangup all calls task
 * **/
public class HangupTimerTask extends TimerTask {
    private IRtmpClient rtmpClient;
    
    public HangupTimerTask(IRtmpClient rtmpClient) {
        this.rtmpClient = rtmpClient;
    }

    public void run() {
        try {            
            rtmpClient.getSoftphone().hangupAll();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }
}
